Ext.define('BISC.view.FilterManagerWindow', {
    extend: 'Ext.window.Window',
    height: 400,
    id: 'filterManagerWindow',
    width: 600,
    closeAction: 'hide',
    title: 'Attribution Manager',
    resizable: false,
    bodyBorder: false,
    initComponent: function() {
        var me = this;

        var manager = Ext.create( 'BISC.view.FilterManagerPanel' );

        manager.on( 'done', function() {
            me.doClose();
        });

        Ext.applyIf(me, {
            items: [
                manager
            ],
            dockedItems: [
                {
                    xtype: 'toolbar',
                    ui: 'footer',
                    dock: 'bottom',
                    items: [
                        '->',
                        {
                            xtype: 'button',
                            width: 75,
                            text: 'Close',
                            scope: me,
                            handler: me.doClose
                        }
                    ]
                }
            ]
        });

        me.callParent(arguments);
    },

    doClose: function(button, e, options) {
        // fire close event on parent
        this.hide();
    }

});
